#ifndef DEFINES_H_
#define DEFINES_H_


//nomi delle texture
const int TEX_BULLET = 0;
const int TEX_CER = 1;
const int TEX_CER1 = 2;
const int TEX_FUOCO = 3;
const int TEX_SMOKE = 4;
const int TEX_NORM = 5;
const int TEX_DES = 6;
const int TEX_SIN = 7;
const int TEX_MAL = 8;
const int TEX_OK = 9;
const int TEX_MAP = 10;
const int TEX_BER = 11;
const int TEX_ELI = 12;
const int TEX_SKY = 13;
const int TEX_NUV = 14;
const int ERBA = 15;
const int ERBAROC = 16;
const int ERBASC  = 17;
const int ERBERB = 18;
const int ROCROC = 19;
const int ROCCIASC = 21;
const int ROCCIA  = 22;
const int TEX_LOADING = 24;
const int TEX_PAUSED = 25;
const int TEX_ENDING = 26;

//tempo di gioco    
static int GAME_TIME = 300;

//vista 
static float VIS_ANGLE = 60.0;

//cielo
static int SKY_DIM = 1500;

//colori
static float MYBLUE[3] = {0.6,0.2,0.1};
static float MYVOILET[3] = {0.3,0.5,1};

//dimensioni dello viewport
#define LARG_SCR 800
#define ALT_SCR 600
#define PROF_SCR 2500//700

//parametri camera
static const float MIN_BLUR= 0.6;
#define CAM_NUM 6//700
static const float ASPECT_RATIO = 0.9;
static const int FAR_STEP = 300;
static const int MAX_EYE_FARXZ = 800;
static const int MAX_EYE_FARY = 180;
static const float CAM_EYE[CAM_NUM][3] = {{0,10,20},  //camera 1
                                    {-25,-2,10},
                                    {0,5,10},
                                    {-3,-2,12},
                                    {0,15,20},
                                    {0,15,30}};


//target
static const int TARG_DIM = 100;
static const int TARG_DAMAGE = 50000;
static const int TARG_INTERVAL_SHINE = 20;
static const int TARG_INTERVAL_NUM = 1440;
static const float MIN_TARG_SIZE = 0.1;
static const float MAX_TARG_SIZE = 1.0;

//costanti elicottero da terra e volo
static const int   FLY_ZONE_DIST = 925;
static const int   FLY_HEIGHT = 70;
static const float MAX_INC_ALT = 0.7;
static const int   MAX_VEL_ROT = 25;
static const int   MAX_ANG_INE = 15;
static const float MAX_INC_ANG_INE = 1.5;
static const int   SCALE_FACTOR = 5;
static const int   COP_VEL = 2;

//terreno e generazione
static const int    TERRAIN_POINTS  =  80;
static const int    TERRAIN_PART_DIM =  40;
static const int    FAULT_ALG_MAX_ITE =  2500;
static const double SMOOTHING_COSTANT  = 0.46;    
static const float  HALF_TERRAIN = (TERRAIN_PART_DIM * TERRAIN_POINTS)/2;

//esplosioni
static const int    MAX_EXP_NUM = 60;
static const int    MAX_SMOKE_NUM = 60;
static const int    MAX_DUST_NUM = 3000;

//proiettili
static const int    BULLET = 2;
static const int    MAX_BULLET_NUM = MAX_DUST_NUM;
static const float  RELAY_BULLET = 0.1;
static const float  BULLET_VELOCITY = 5.3;
static const float  BULLET_GRAVITY = 0.84;

//missili 
static const int   ROKET_NUM = 8;
static const int   WEAK_ROKET = 0;
static const int   HEAVY_ROKET = 1;
static const int   MAX_HEAVY_ROKET_NUM = 30;
static const int   MAX_WEAK_ROKET_NUM = 1000;
static const float ROKET_Z_DISP = 0.5;
static const float ROKET_YH_DISP = -0.9;
static const float ROKET_YL_DISP = -0.4;
static const float ROKET_XV_DISP = 4;
static const float ROKET_XF_DISP = 4.6;
static const float ROKET_SHOT_HEIGHT = 2;
static const float ROKET_SHOT_VEL = 1.1;
static const float ROKET_SHOT_DEC = 0.16;
static const float RELAY_ROKET = 0.2;

//pigreco
static double PI = 3.14159265;
static double PI_DIV_180 = PI/180;

//strighe del programma
static char* HELP_STRING = {"Press \"Esc\" for Help/Pause"};
static char* TIME_STRING = {"REMAINING TIME : "};
static char* SCORE_STRING = {"SCORE : "};
static char* NO_FLY_ZONE_STRING = {"NO FLY ZONE! TURN BACK TO MISSION!"};
static char* RESULT_STRING = {"YOUR SCORE IS : "};

//percorsi dei file da caricare  texture
static char* SKY_RES = { "../res/textures/trm.ppm"};
static char* CLOUD_RES = { "../res/textures/nuv.ppm"};

//terreni
static char* GRASS_RES = { "../res/textures/erba.ppm"};
static char* ROUGH_RES = { "../res/textures/grass06.ppm"};
static char* GRA_ROC_RES = { "../res/textures/erbaroc.ppm"};
static char* GROUND_RES = { "../res/textures/grnd01.ppm"};
static char* MOUNT1_RES = { "../res/textures/rockie.ppm"};
static char* MOUNT2_RES = { "../res/textures/mount5.ppm"};
static char* MOUNT3_RES = { "../res/textures/mount4.ppm"};
static char* MOUNT4_RES = { "../res/textures/mount3.ppm"};
static char* MOUNT5_RES = { "../res/textures/mount5a.ppm"};

//mappa
static char* MAP_RES = { "../res/textures/map.ppm"};
static char* POS_NEM = { "../res/textures/posizione.ppm"};
static char* POS_RES = { "../res/textures/posn.ppm"};
static char* POS2_RES = { "../res/textures/posn2.ppm"};

//fumi vari
static char* FUM_RES = { "../res/textures/fumo.ppm"};
static char* CER_RES = { "../res/textures/cer.ppm"};
static char* CER1_RES = { "../res/textures/cer1.ppm"};

//fuoco e proiettile
static char* BUL_RES = { "../res/textures/bullet.ppm"};
static char* FUOCO_RES = { "../res/textures/fuoco.ppm"};

//fotine
static char* FOTNORM_RES = { "../res/textures/fotonorm.ppm"};
static char* FOTOK_RES = { "../res/textures/fotook.ppm"};
static char* FOTDES_RES = { "../res/textures/fotodes.ppm"};
static char* FOTSIN_RES = { "../res/textures/fotosin.ppm"};
static char* FOTMAL_RES = { "../res/textures/fotomal.ppm"};

//immagini statiche
static char* START_RES = { "../res/textures/start.ppm"};
static char* PAUSE_RES = { "../res/textures/pause.ppm"};
static char* END_RES = { "../res/textures/end.ppm"};


//percorsi dei file da caricare modelli
static char* COP_RES = { "../res/models/cop/elic_intero.obj"};
static char* COP_SPM_RES = { "../res/models/cop/elic_spm.obj"};
static char* COP_ELANT_MOD = { "../res/models/cop/elica_princ.obj"};
static char* COP_ELPOS_MOD = { "../res/models/cop/elica_dietro.obj"};
static char* COP_MIS_MOD = { "../res/models/cop/missile.obj"};
static char* ENEMY_RES = { "../res/models/enemy/enemy.obj"};
static char* TREE_RES = { "../res/models/terrain/tree.obj"};

/*


//percorsi dei file da caricare  texture
static char* SKY_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/trm.ppm"};
static char* CLOUD_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/nuv.ppm"};

//terreni
static char* GRASS_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/erba.ppm"};
static char* ROUGH_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/grass06.ppm"};
static char* GRA_ROC_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/erbaroc.ppm"};
static char* GROUND_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/grnd01.ppm"};
static char* MOUNT1_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/rockie.ppm"};
static char* MOUNT2_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/mount5.ppm"};
static char* MOUNT3_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/mount4.ppm"};
static char* MOUNT4_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/mount3.ppm"};
static char* MOUNT5_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/mount5a.ppm"};

//mappa
static char* MAP_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/map.ppm"};
static char* POS_NEM = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/posizione.ppm"};
static char* POS_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/posn.ppm"};
static char* POS2_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/posn2.ppm"};

//fumi vari
static char* FUM_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/fumo.ppm"};
static char* CER_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/cer.ppm"};
static char* CER1_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/cer1.ppm"};

//fuoco e proiettile
static char* BUL_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/bullet.ppm"};
static char* FUOCO_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/fuoco.ppm"};

//fotine
static char* FOTNORM_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/fotonorm.ppm"};
static char* FOTOK_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/fotook.ppm"};
static char* FOTDES_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/fotodes.ppm"};
static char* FOTSIN_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/fotosin.ppm"};
static char* FOTMAL_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/fotomal.ppm"};

//immagini statiche
static char* START_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/start.ppm"};
static char* PAUSE_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/pause.ppm"};
static char* END_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/textures/end.ppm"};


//percorsi dei file da caricare modelli
static char* COP_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/models/cop/elic_intero.obj"};
static char* COP_SPM_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/models/cop/elic_spm.obj"};
static char* COP_ELANT_MOD = { "/home/dellonte/workspace/BuLLeT_PRooF/res/models/cop/elica_princ.obj"};
static char* COP_ELPOS_MOD = { "/home/dellonte/workspace/BuLLeT_PRooF/res/models/cop/elica_dietro.obj"};
static char* COP_MIS_MOD = { "/home/dellonte/workspace/BuLLeT_PRooF/res/models/cop/missile.obj"};
static char* ENEMY_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/models/enemy/enemy.obj"};
static char* TREE_RES = { "/home/dellonte/workspace/BuLLeT_PRooF/res/models/terrain/tree.obj"};
*/

typedef struct vector_s
{
    float x, y, z;
} vector_t;

typedef struct vertex_s
{
    float x, y, z;
} vertex_t;


#endif /*DEFINES_H_*/
